public static int ifIt(boolean x, int y, int z) {
if (x && y > z)
return y;
else
return z;
}
| Function Call | Return Value | |||
|---|---|---|---|---|
| ifIt(true, 3, 1) | → | |||
| ifIt(false, 3, 1) | → | |||
| ifIt(true, 10, 3) | → | |||
| ifIt(false, 11, 3) | → | |||
| ifIt(false, 51, 32) | → | |||
| ifIt(true, 1, 0) | → | |||
Experiment with this code on Gitpod.io